package com.kun;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;


/**
 * zuul不仅只是路由，并且还能过滤，做一些安全验证
 * http://localhost:8769/api-a/sayHello?name=yeyi
 * http://localhost:8769/api-b/sayHello?name=yeyi
 *
 * 以/api-a/ 开头的请求都转发给service-ribbon服务
 * 以/api-b/开头的请求都转发给service-feign服务
 * */
@SpringBootApplication
@EnableZuulProxy
@EnableEurekaClient
@EnableDiscoveryClient
public class ServiceZuulApplication {

    public static void main(String[] args) {
        SpringApplication.run(ServiceZuulApplication.class, args);
    }

}
